/*
 * @Author: 一路向阳 tt_sunzhenfeng@163.com
 * @Date: 2024-02-29 23:33:17
 * @LastEditors: 一路向阳 tt_sunzhenfeng@163.com
 * @LastEditTime: 2024-03-03 23:00:48
 * @FilePath: \utils_react_manager\app\src\api\word.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

// 单词列表
export const wordListData = (data: IWordListPayload) : Promise<IWordListResponse> => {
  return request.post("/word/list", data);
};

// 测试单词
export const learnWordData = (data: ILearnWordPayload) : Promise<ILearnWordResponse> => {
  return request.post("/word/learn", data);
};

// 新增单词
export const addWord = (data: IAddWordPayload) : Promise<IAddWordResponse> => {
  return request.post("/word/add", data);
};
// 更新单词
export const updateWord = (data: IUpdateWordPayload) : Promise<IUpdateWordResponse> => {
  return request.post("/word/update", data);
};

// 熟悉/陌生单词
export const wordCount = (data: IWordCountPayload) : Promise<IWordCountResponse> => {
  return request.post("/word/count", data);
};